home *** CD-ROM | disk | FTP | other *** search
/ The Games Machine 76 / XENIATGM66.iso / Indiana Jones / Indiana Jones.exe / RESOURCE / PREVIEW.GOB / cog_riv_ambwaterfall2.cog < prev    next >
Text File  |  1999-11-15  |  1KB  |  60 lines

  1. # Jones 3D Cog Script
  2. #
  3. # RIV_AmbWaterFlow1.cog
  4. #
  5. # [TRM]
  6. #
  7. # (C) 1999 LucasArts Entertainment Co. All Rights Reserved
  8. # ========================================================================================
  9.  
  10. symbols
  11.  
  12.     message     entered
  13.     
  14.     thing       ambientPos
  15.     
  16.     sector      sec_On1     linkID=1
  17.     sector      sec_On2     linkID=1
  18.     sector      sec_On3     linkID=1
  19.     
  20.     sector      sec_Off1    linkID=0
  21.     sector      sec_Off2    linkID=0
  22.     sector      sec_Off3    linkID=0
  23.  
  24.     sound       snd_Water=riv_h20_rapid_a.wav     local
  25.     
  26.     int         looping     local
  27.     int         playing=0   local
  28.     
  29.     flex        vol=1.0
  30.     flex        min=15.0
  31.     flex        max=30.0
  32.     
  33. end
  34.  
  35. # ========================================================================================
  36.  
  37. code
  38.  
  39. entered:
  40.  
  41.     if((GetSenderID() == 1) && (playing == 0))
  42.     {
  43.         playing = 1;
  44.         Sleep(Rand());
  45.         looping = PlaySoundThing(snd_Water, ambientPos, vol, min, max, 0x0001);
  46.     }
  47.  
  48.     if((GetSenderID() == 0) && (playing == 1))
  49.     {
  50.         playing = 0;
  51.         StopSound(looping, 2.0);
  52.     }
  53.     
  54.     return;
  55.  
  56. # ========================================================================================
  57.  
  58. end
  59.  
  60.